﻿using Mate.Db.Model.Comment;
using Mate.Db.SqlSugar;
using Mate.Dto.Comment;
using System;
using System.Collections.Generic;

namespace Mate.Comment.Service
{
    public interface ICommentService : IDataService<mp_comment>
    {
        /// <summary>
        /// 获取点评列表
        /// </summary>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="comment_type">点评类型，10商户，20商品  Mate.Core.Enums.CommentTypeEnum</param>
        /// <param name="key">搜索关键字</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
        IList<CommentModel> GetCommentList(int pageIndex, int pageSize, int comment_type,string key, ref int totalCount);

        /// <summary>
        /// 获取点评实体
        /// </summary>
        /// <param name="id">点评id</param>
        /// <param name="comment_type">点评类型，10商户，20商品  Mate.Core.Enums.CommentTypeEnum</param>
        /// <returns></returns>
        CommentModel GetComment(int id, int comment_type);

        /// <summary>
        /// 获取首页点评列表
        /// </summary>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="merchant_category_id">商户类型</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
        IList<HomeCommentModel> GetHomeCommentList(int pageIndex, int pageSize, IEnumerable<int> merchant_category_id, ref int totalCount);

        /// <summary>
        /// 获取商户点评列表
        /// </summary>
        /// <param name="merchantId">商户id</param>
        /// <returns></returns>
        IList<MerchantCommentDto> GetMerchantCommentList(int pageIndex, int pageSize,int merchantId, ref int totalCount);
    }
}
